<?php

use Biz\model\wiki\WikiRankingConfig;
use Biz\service\Share;
use Biz\service\wikiRanking\Ranking;
use Doraemon\service\statSign\Basic as statSign;

class CategoryListAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_NOTHING;

    public function main()
    {
        $res = Ranking::getAllRankingCategoryList();
        $list = [];
        foreach ($res as $type => $rows) {
            $list[] = [
                'type' => $type,
                'list' => array_values($rows)
            ];
        }
        $this->setSuccess($list);
    }
}